w2r: release copy immediately if no host copy is available#684
Closed
devreal wants to merge 2 commits intoICLDisco:masterfrom
Closed
w2r: release copy immediately if no host copy is available#684devreal wants to merge 2 commits intoICLDisco:masterfrom
devreal wants to merge 2 commits intoICLDisco:masterfrom
Conversation
Contributor
|
I would like to see the opposite code for this: where we create a copy that is not attached to a data. Please point me to it. |
Contributor
Author
That's not a thing we do in TTG. What we do though is to create a data that goes out of scope before the end of the program and we detach the host copy from the data. Now the data still exists (because it is ref-counted) and has device copies but no host copy anymore. |
4afa103 to
0c9b1a0
Compare
Signed-off-by: Joseph Schuchart <[email protected]>
We should track w2r tasks. There may be cases where an eviction is started but no pushout to the host happens afterwards before tear-down, e.g., if the data produced in a kernel is sent to another process. The tear-down will then find data in inconsistent state. Signed-off-by: Joseph Schuchart <[email protected]>
2793b2a to
3996a9d
Compare
Contributor
Author
|
This is replaced by #695 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
And if no readers exist on the copy.
In TTG, host-side data can disappear once its life-time ended, detaching the CPU data copy from the data. On eviction, we have no host copy to evict to so we just drop the device copy. This is not perfect as it might lead to race conditions with multiple devices but it is a step forward.